--Api ��
/*
select * from SYS_Apis
select * from SYS_ApiM --M  Memo Main Manage
ReturnType
�������ͣ����Ʒ���ֵ��
1 execSql 
2 openSql
3 execProc(�������ؽ��) 
4 openProc(�����ؽ����)
5 getList (ʹ��getList sql ģ��)
*/

declare 
  @code varchar(12)='090',
  @ApiName varchar(50)='sqlapi.get_value',
  @ReturnType int =51
--
/*����ѷ�����������ʹ���ˣ�ʹ�� sqlapi.get_list ����
*/
--
delete from SYS_Apis where code=@code
delete from SYS_ApiM where code=@code
insert into SYS_ApiM
select @code,'��ȡ���ֶ�ֵ','��ȡ���ֶ�ֵ�����ص�һ�����ݣ�Ϊһ������'
insert into SYS_Apis(code,ApiName,paramsLen,params,ReturnType,sqlText)
select @code,@ApiName,0,
null,
@ReturnType,
'select #(f) from
#if(d_name) [#(d_name)]..#end #(t_name) with(nolock)
#for(x : w)
  #(for.first ? "where": "and") #(x.key) #para(x.value)
#end'
